works with unit tests