added state reader