code formatting and style tweak