Passing argument by reference instead of by value in executor class