Final integration code