removed hashset, added hashmap, cleaned code up, cleaned bugs