Make search more generic