getState method