fix unnecessary code