new logic of join elements by type process;