use iterators instead of for loops when removing people from the hashmap