adapted jooseps new scheme, added add. checks