made internal functions