changes to get this working for tests