Arc problem: now with refactoring!