some more work on scheduler