reformatting for better debugging
proper close checking