Use some kind of hash table to speed up methods