update snippet functionality