code test ref: http://qiita.com/sugarrina/items/63a425be4c5c55456b85