minor changes and alterations and finishing script