Pass by reference here is tricky stuff.