update chapter23 method 1