refactored install.sh