extract and fix _addContentWrapper method