changing close connection method call