global functions added; api changed to use them