Use select instead of each_with_object