updates for closing connection on completion