minor idiomatic changes