can not use a local variable out of function