start of task functionaity