moved functions to cidrlib