rehash functionality done