testing logic on if view exists