tutorial add to admin index page and some refactor