Add state factory