update snippet and dictionary