If you want to get rid of the gates and put in ball valves, you pretty much cut out the gate valves and solder in ball valves. It is probably easier to cut out the whole works and lift things up a hair than work with old parts. Forget the male ball valve. It really gets down to soldering skills and whether there is water running out of the pipe - which requires an upgrade in soldering skills. As for the exact way to do it, there are many different ways that would work. It will be easier to figure it out on your own than try to understand one possible way somebody tells you about. Hope that was easy enough.