Added a better way to do function exercise