Updating the old code