improved cpp formatting