[PD] exiting function in external