the solution to this problem has been solved here
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1841.0

hope this info helps someone too