changing defines for better portability