changed query statements