added new `root` option to implement nested names