convert scripts to ruby