Attempt to make more efficient by operating only on visible region