Reworked using hashing