added back in query joins