tried to avoid side-effects in tests