Update snippet and funtions