adding method to add task