passing query to each lib