debug the HR code