rewrite view callback function index