Implement getState