updated Clear Completed function