HashMap refactory