transform function wasn't passing vectors by ref