gahhhh
scripted update of code from master at b259e8d gahhhh