replaced data frames with dictionaries