adding states to debug messages