Added close() method