saving state working consistently