add gamegrid functions refactoring