find extreme corners