i have a 2005 bmw 325i which suddenly started experiencing accelerationmproblems on 2005 BMW 325i

aving trouble with acceleration sometimes absolute loss of power with pedal to floor sometimes power will increase slowly with normal rpm climb sometimes the rpms will surge very high with little or no acceleration. Has stalled couple of times but will restart. Seems to run more sluggishly at lower speeds and smoother at higher speeds.

Asked by for the 2005 BMW 325i
do you have any eng or trans codes?