correct implementation of visibleRect