I have solved the problem ! I checked the fuel pressure on the rail and it was 35 which I understand is close to normal. To me this ruled out the pump

. So I began to go through all the other items that can stop the engine. Mass air sensor near the air cleaner box was my first choice and the engine ran ( although a bit raggedy) when it was disconnected. I removed it and cleaned the contact points and blew all the dust out. Now it ran really well ! I am SO relieved this wasn't the fuel pump
Piper, thank you very much for your advice . First thing tomorrow it goes to the dealer to have that "check engine' light dealt with. I learned from this experience.