Created a script file with a sorting function