- added close function