changed calculate Speed