So i was driving to work, the car probably went like 2 blocks from my house and while driving I try to shift gears and it starts to turn off as if i was stalling out so I stepped on the clutch and let off and it went back to normal then 5 seconds later while downshifting it did it again and none of the pedals would work then it completely shut off, then I turned it back on and it went smoothly to work. While coming home from work it almost did it again but it didn't, any help?