Updated internal functions