trim the snippet