refactor ruby-sudoku