Coordinate fix

Now use coordinates to specify location for the rules of replacement