modification to hash calculations