modified task handler for task delete