change to hash implementation