add progs from chapter 4