Removed unnecessary search by using hash.