more of chapter 3 FunctionalJS