Renamed tempSearch to initializeSearch