Refactor
rewrite snippetinsetion