logging the state