added macros for optional support