uncomment some needed code. remove some unneeded code