optimize dashboard action of admin and index controller