Added addTask function