making a bit more idiomatic