new code to stack content and metadata