my code following along with the book