Add script and update functions