added script loading mechanism