Save state to hash