completed chapter 3.2
modify template for "INPUT" etc.