changed a few minor things

made min and max (x1 and x) coordinates instead of center one