contributed by Daichi Shinozaki.