update button functionality for completed and delete