hash map impmentation, before array