expand on function.cc