adding hashname creation to switch.  adding error return on switch init.