added ifdefs