updated template to take sub contents as an array element