extracted view logic