added close method