some algorithm with scala.