new sample, -s option, added open tag detection