refactored Sudoku.scala