Added numer of offsets to check_offset_ function: {-2,-1,0,1,2} means number of offsets, secend 1 - mean checked from begin, 2 - from end