added basic game flow logics