updated isInview method