ex4.3 use hash-table