update totoro and refactor code style