entropy as a state function