removed logic error in hash val