find flat surface