added type classes, tree, io