saving before trying popup
small changes