Create function in deploy script