address comments by Andreas Maeder, merged 3.4 with 3.1