make the script more ruby like