refactoring some Sudoku code from Ruby Wednesdays Meetup