first part of the integration