Added GetState method