Added non-thread safe method for generating sequence