#9 improved ny checking vertices of first rectangle