Modelling labour market dynamics with on-the-job search