Changed search algorithm

Changed the search from a map/entryset lookup to a value list lookup as suggested by Soaryn :)