refactored parse_names.rb