better find implementation