take view logic off of model