Updated double hashing implementation