removed some internal functions