updated joins. fixed tests.