logic of beginning() MUCH better, globals not working like I want