Redone using lists instead of dictionaries