ordinal type implementation