added code for testMaxSpeed