improve integrate data script