Changes scope of function