added reference integrity test