fixes variable names in toPanel function. adds drawChessboard function to check distortion