saving state on footer