implement query scopes and stacked strong permits