little refactoring in deployment/run script