added check if a relationship is active or not
added check if a relationship is active or not