adding some start/end tag/seq checking