detecting search_type has to be before search for sr cmd to work