refactoring partially done, need to loop game function