add progs from chapter 3