sort out data model for passing around element and subelement paths