added amal tool for state diag