optimalization of getting cost
walking speed update