added parallel integral counting