switched to Hashtable instead of array for serial input