updated query for dump