changed time for each query to use curl's total_time instead