search refactored so that 1 function can handle searching any column 1 at a time