Updated connection converter

Slightly more elegant solution