adds beginning of function