added simple mod hash function