added test for self join