I'd suggest moving this line up after ```distancex(x|y)```