adding getstate