updated save and read