move code from game into here.