Add new task with function