Integrating main functionality