remove unnecessary code and change the visibility