I was having a problem just like that one and it turned out to just be my throttle body sensor. Im no expert but you could start by checking that.