fork and editted from sourceforge.jp/projects/kakuretter