globals to ctx