add close method