implement exit button