Make sourceAction in function scope