fixed the find algo to match the stl interface.