add snippet handler