external functions