took some logic out of the view