print functions and protocol functions converted to use new type system