added state maintenance