added state data structure