exploring the close function