distance and avg speed working