working on general scheduler