Changed byref to ref