generalized functionality
moved things around to support generally replacing old with new style scripts