add join and where filters to build root map