prevent object copy by passing the reference instead