Using references for passing parameters