story#741, format some code according to Mark's code review