added support for defining the scope of sequences
changed spec to define the scope of sequences rather than ints