changed implimentation to use arraylist instead of hashmap in string to int