implementing a small game