improved localization for no jumps
added function for pole recognition