select_face algorithm