view all function improved