Implementing a sudoku solver