[PB] {refactoring} Improved program flow