Auxiliary functions
Several special functions are combined here: