added functions script