stuff
program works correctly
added click close feature