complete adding task function