global scope on function