P160, P162: Tweaked solution code.