start of function framework