remove and add unused code