expose function
scripted update of code from master at 9a956f5 expose function