implement resize state save