fix book bug and generate sample book