made changes to script loader