add join with template