A useful technique with hashmaps