adds a function to self update