more changes to hash and MSE