fix distance in func:speed