delete unused references