base.php moved to model