update change obj to ref.