Please dont pass arguments by reference. Instead of that return them after modification as a function result.