modified to range over tests - more idiomatic