finalized task remove function