Revert "pass by reference bug fixed"

This reverts commit b51448248838dee1d99e0e832b179570079337d8.