make some idiomatic ruby changes