pickler generation rewrite