Update by notes from joschiwald