there's a weird quirk in IT when env[i].x == env[i+1].x. do this quirk.