add client close method