Updated book code to include user ID