some refactor in tools/install-pre-requisite.sh