Add populateState method