Added referntial integrity