distance function should takes abs value of point differenes
fix zoom bug