changed scheduling to return a table