handled page changing and sequence.