rearranged clearAll() in tests