added game board reference and some utility functions