hashmap implementation and stuff