added timeout to handle query limit exceeded #37