saving before endl