added gameflow code