Submitted by: Hidekazu Kuroki <hidekazu@cs.titech.ac.jp>
tested---someone else please try other languages!)