added state printout