change fragment to query