add sequence function