trimming unused resources