change joins structure for better merge
better organize unit tests