finished display_info_by_attribute method