working with names
pull out redundant code
first pass
add some error trapping
cleaning
commenting
add comments