reformat legacl snippet