add script file - separate functions