struct was defined too late in code