updated HBD script