Handle most situtations with rails involved, need to handle ones wehre you are connecting to the rail closest to your pin.