Refactoring the code in RefereeDAO.php