implement methods in Taskbag class