eliminating possible infinite recursion in initializeState