use list instead of hash table (fix #33)