- added in a master while loop (because I'm a moron!)