saving before branching