began refactoring of install setup script