refactored scheduler and incorporated task list functionality