Return correct sequence, code refactoring.