added connection closure