function.cpp
updated documentation