a shorter code of next sequence