Update functions.lua