separate model and view methods