tiny change to connection func