starting testing saving optimizer state