New write method.