add popup functions and change exit/show/hide functions