fix specs by using inject instead of sum