add safeguards for loading and updating