This is viewlogic shouldn't be in a controller