added game functionality and saving