adding base of chapter3 excercise