adding main component. MAJOR PERF IMPROVEMENT!