refactor in list:all and get diags