Changed post-increments to pre-increments were suitable for efficiency.