worked on game flow logic