Apply feedbacks from @tacahiroy: https://gist.github.com/yasulab/3866cf1a124dcea9842c