put var inside of function