more code for all chapters - prototypes, needs work and translation