add close all connections method