add function name to function snippet
simplify class snippet