added dbname as first parameter on the search