started implementation of ptree