update func snippet