added Query1 function