split into types, pretty print and parse