1This code was written by Rainer Schöpf.