Update model.php

removed some duplicity