added wSize to checkIndsGen