safer search for prompt - should remove the need for '&& echo's in the code