update towards better portability