it wasnt the throttle sensor i didnt think so because it didnt have a problem while i was driving just during the idle.
i brought it to my friend who's a mechanic (im going to be a mechanic too)
it was a vacuum leak going to the map sensor that was causing all the problems. fixed. thanks for the response though