fixed unnecessary code