changes for better portability