another small change to the speed calculation