add save state and load state using redis