refactored chess board