Adding done button functionality