transfered total and succeded variables ouside of index method and re-genereated docs