the train rocked from side to side in a soothing way , although every once in a while , the gears would grind together , making the car shudder and the windows rattle as the engine struggled up the mountain .