replace sort with linear search

replace conversion to list, sort and first with a min.  Now compiles with scala 2.10