basic sequence checking logic added.