Add functions to script