Implemented pole recognition (to be tested...)