save before switching to branch