Replaced exception function with an up to date, available version