added defined() check