unused referenses are removed