retyped main