add back getState function for Viewer