Save state in hash