refactoring around Sequence