re-added close method