generalized with #define