filtering the resources