use hash table to store methods