refactored game master test and code