adopt to an API excluded from stdlib