code style overhaul part 1
code style overhaul part 2