added basic gameflow code