added complete task function