More idiomatic code