Update to new code