replaces shell script with ruby