Helper for stack creation