Chapter4 Example3: corrected path case