Switched from bash to ruby