added comments to hdb3 functions