Small change to getState method