updating event handler for cancel button to toggleDisplay