added functionality to clear button and added new button