seperating query