Implement type code by hand