switched from lists to dictionaries

switched from lists to dictionaries for inner key/values