serialize dimension