initial cp integration code