slight optimization to pass the memory address instead of an address of copied variable