implemented a sequence generator