added state factory