fix for only variables should be passed by reference