Planning and improvisation in services