queries improvments