adding conditional logic to hls distribution