allow setstate from clients, add state capture and restore to AAR tool