get view logic out of the model