reworked scheduler creation