add join queries + tests.