made investor searching a function