improviments in the hd scripts