changed to use dictionary<T,V>