Trying to replace an outlet in an old house. Outlet has metal box, and three ( 3 wire, black, white, green) wire sets entering the box. The way it was wired, one black and white going to one set of screws at bottom of outlet, other two sets going to the other set of screws ( yes 2 wires on each screw). I turned off breaker and confirmed the outlet was not working. Rewired new outlet same way, accept used side screws and back stab slots instead of 2 wires on screws. I added a ground screw to the box ( didn’t have one) and picktailed grounds to the outlet. Put it back together and it didn’t work. Pulled it back apart and got shocked. One black wire is still hot with breaker off. Not sure where the other set of wires go, one set probably goes to a nearby light switch. The switch has one set of wires. Black, white, green if that helps. So questions, why is there still a hot black when outlet is off? Why did I not get shocked when unhooking and re-hooking the wires the first time? How do I wire this back correctly?