moved distance to config