working on Chapter 2 of main