mods for first top level script almost there