update code to fix unnecessary code