using outerwidth outerheight
scripted update of code from master at f8ae10e using outerwidth outerheight