changing find implementation slightly