Changed the Vector list into a HashMap and replaced the used variable with the value parameter in the HashMap.