to make maxrect for the check