if swap to throw refactoring.