update old code