added few modifs from Bernhard
ok