finished up game functionality