Added update reference functionality