update ref implementation