organized import
added stream closing