fixed silly pass by reference error that caused last values in hash to overwrite all others