refactoring viewers as array of dictionaries