added hashMap producing code