removed .close()

in main