use accessors to copy state.