added some tests. scheduler is working reasonably well