added passing function
Finished Chapter 2 exercises