Best way to remove nipples on water pump?

I just put a pipe wrench or adjustable on the the square top portion of the correct size tool that fits down inside the pipe fitting. I hammered it in so that a good portion was down into the pipe. This way I wouldn’t just twist off the top of the old corroded pipe. Put a liberal amount of penetrating oil on the bottom area where it goes into the waterpump. Then I just muscled on it a bit and it came right out. Didn’t crush the pipe didn’t even mar any of the threads. Easy peezy. I think for future use the money was well spent.