Added functional code for executeSearch