What's wrong with just passing by reference like I'm doing?