modified:   hdirecode.r