updating prepare data script