New version of script where group, header and content are well defined