added #ifdefs for optional compile