updated Model.php