implement hash map based on chaining