How to interact with a police officer(s)

The last “official” conversation I had with an officer, it was absolutely pouring the rain! When he flipped the blue lights on, We were coming up on an overpass. I pulled over and stopped under the bridge. I turned the interior light on and sat with my hands on the wheel. He came up on the passenger side, and asked if I would roll down the window. I asked him if it was alright if I unbuckled my seat belt to reach over to roll it down? He said yep. When I cranked it down, he thanked me for stopping under the bridge, and asked if knew why he stopped me. I said, “Well, I don’t think I was speeding because I slowed down because it’s raining so hard you can’t hardly see?” He said “Nope....your right rear tail light is out, but your turn signal worked and your brake lights worked when you pulled over.” I said “ I have a box of 1157 bulbs at home, and will fix it tomorrow when the rain quits.” He asked for my license and registration and went back to his car. He came back a minute or so later and handed it back to me and thanked me again for stopping where he wouldn’t get drownded by the rain, and said to be safe on the way home and just fix the tail light. I asked if I needed to get back with hime to show him I fixed it , and he said nope....I can tell you will fix it because you know which bulb it needs! That was sometime before fall of 2003, because I was still driving my old 84 D350. I bought my 2004 diesel in late 03. You just need to treat them like you would appreciate being treated. Since I chose not to be a dick, and make him stand in the pouring rain, he just let me slide without so much as a warning ticket.