internal functions edit