imported functions for solving portability problem