appears to be fully functional. Program is not efficient, entirely pass by value