changed hash function to align on int boundaries