Created a procedure to house the basic search code