added locking for the shufflers to ensure complete thread safety