add view next function