use loc instead of x/y