add external json loading and saving