limit based on queries