updated implementation to modify message passed by reference