added stuff from http://www.learncpp.com/cpp-tutorial/14-a-first-look-at-functions/