Added support for different joins