made things more idiomatic