fixing up scheduler