Chapter 2 commit, exercise 1,2 and 3