remove printf & work for close