adding a scheduler and changing main process to worker