finished demo of bawejs chapter 4-6