Better way to handle connector