manually merged latest code from Jantje