fixed duplicate methods in model.php