started fixing getstate