Maybe grab the list of keys from args outside the loop? There's no point in calling it n-times.