make number of locations for calculating average speeds configurable