added some debugging for referentials