last adjustments to query and backend