remove connection from func