made macros inline functions instead
fixing conflicts