added viewpoint logic that rick requested