fix tests by making things on "this" global instead