refactor running tasks
refactor