moved native internal functions declarations