be more idiomatic, bool rather than length check