defined function in global scope