added the done button functionality