optimize parsing saved state