implement task loader
move sorting method in task class