changed accel2speed algorithm