def maxElseZero(s: Iterable[Int]) = if (s.nonEmpty) s.max else 0
  def minElseZero(s: Iterable[Int]) = if (s.nonEmpty) s.min else 0

to make it as Double , I need to change Helper File ??  
If I change this Interable[Int] to Iterable[Double] ,Does this affect the other code ???