variables at top of function