alternate x and y routing smartly