update hist data script