Code changes requested by fmorgner