reworking of IntHash and HashMap examples