adding distance scale, updating marker scaling algorithm