Added write features for searialization.