added #ifdef to header files