rewrite check sequences method