Added complete task function