Changes scope of functino