refactor some tests to work offline