added an else so that sub.phy is defined when extant.only is FALSE