The mechanism of Japanese modernization