added some improvements to hash