refactored mysql model to PDO model in preparation for testing