refactoring visual search. now gives results in console