more idiomatic D