Close method implemented