delete unuseful res