updated game function, added more tests