Changed function scope