close connnection method added