Is there a better way to find offsets? Recently there is a good chance for even the first five steps to have out of range values that this method does not pick up.