replaced if with ifdef