implemented several features for valtree