update tests to fix "Only variables should be passed by reference"