added complete task functionality