car: 1995 s500 sedan w140..
Sometimes when I'm driving, the car won't shift gears properly and works fine other times.
i.e. shifts from 1st to 2nd gear just fine...and then goes up to 30 rpm @ 40 miles per hour and doesn't shift gear so if i keep going past 40mph...the rpm will just keep rising!!!

I can hear the noise increase as I accelerate more.
this only happens sometimes but is starting to happen more frequently.. sometimes the car runs fine. sometimes it doesnt
suggestions please.
thanks