zを使ってみた ref: http://qiita.com/items/bd756f30467176082df0