added state save to DAL