pass parameter as a reference instead of a copy