factored out an interface for things have a global object