remove external calls in tests