removing unuseful resources