Hard to unit test