took logic out of view