added patch-7 from Andreas Rueckert
Merge branch 'work' into bot
formula slightly changed