update code style and comments accordig to feedback of code reviewing