pass rootElement and add more comments