add NewRoot* function and add reader to the example