Add fundtion to script