changed shutdown to close in the interface and made the required changes