modify sequence of joins