an update to save and load

i renamed a variable and put in some safety code