finished refactor & testing minimax class