adapt the scheduler. Nothing is tested yet