code book and bug fixes