optimized/put in a separate function
the way we handle exit button in main screen