setting up task management functions