Add ifelse in c.snippets