Added code to set task completed