eightQueens refactor