basic functionality of game