save current state. localization seems working not very well