using singelton pattern for reOrderTasks
converted global scope to modular scope