Definition of a custom principal decoder