added more #define for portability