updated for changes to globals