Rough Idle

I have a 2003 dodge ram 1500 SLT 4x4 and have 145,00 miles on it. bought at a buy here/ pay here lot and have been having issues a month after i bought it.Right now i am dealing with rough idle/low idle issues.I did however discover if i take off the small vacuum line off of the master cylinder,it idles like it is suppose to,but replace it,and back to low idle.replaced idle control sensor and valve but still confused on why still low idle.