Added code to dynamically select appropriate arc.