adjusted offset to match the picture in the book (but not the example code)