start code for save/restore
get save/restore code working