added models and view functions