add close method to interface