save before changing the routes