integrated todd's scripts
Completing previous changes