simplified the diag? function