make load_script a lambda