rebuilding game in main/subroutine