Aligned code formatting with the code in the book.