saving state; I really need to learn how to use branches correctly