code that has been tested, runnable with eclipse indigo and runa