would it be more idiomatic to use filter instead of keep, for both of the above lines?