improve resource filtering