removed unnecessary code and comments