Added the close method