add functions to solve game