Implementation of external functions.