converted more scripts to ruby